package fr.upmc.i3s.upmcontact.contents;

import java.util.Date;

public class StudentLifeInfo extends Published {

	private static final long serialVersionUID = 2665130737371761465L;
	
	private String eventType;
	private String additionalInformations;
	
	public StudentLifeInfo() {
		super();
		this.additionalInformations = null;
	}
	
	public StudentLifeInfo(String id, Date createdAt, Date updatedAt,
							String title, String description, String photoPath, String link, User publishedBy,
								String eventType, String additionalInformations) {
		super(id, createdAt, updatedAt, title, description, photoPath, link, publishedBy);
		this.eventType = eventType;
		this.additionalInformations = additionalInformations;
	}

	public String getAdditionalInformations() {
		return additionalInformations;
	}

	public void setAdditionalInformations(String additionalInformations) {
		this.additionalInformations = additionalInformations;
	}
	
	public String getEventType() {
		return eventType;
	}

	public void setEventType(String eventType) {
		this.eventType = eventType;
	}
	
	@Override
	public int hashCode() {
		return super.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		StudentLifeInfo other = (StudentLifeInfo) obj;
		if (additionalInformations == null) {
			if (other.additionalInformations != null)
				return false;
		} else if (!additionalInformations.equals(other.additionalInformations))
			return false;
		if (eventType == null) {
			if (other.eventType != null)
				return false;
		} else if (!eventType.equals(other.eventType))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return super.toString()+" StudentLifeInfo [eventType=" + eventType
				+ ", additionalInformations=" + additionalInformations + "]";
	}
	
}
